package com.bookmall.cart.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;

/**
 * @Description:
 * @Author 胡菜鸡
 * @Create 2022-04-15-14:13
 */
@Configuration
public class SessionConfig {
    /**
     * 更改存储序列化为json序列化
     * @author 胡菜鸡
     * @date 2022/4/4 22:33
     */
    @Bean
    public RedisSerializer<Object> springSessionDefaultRedisSerializer(){
        return new GenericJackson2JsonRedisSerializer();
    }
}
